home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / internet-tools / connect-line / cl / devkit / c / include / lists.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-12  |  838 b   |  27 lines

  1. /*
  2. **   Exec List Support Macros
  3. **   to overcome type quirks.
  4. **/
  5.  
  6. #ifndef EXEC_LISTS_H
  7. #include <exec/lists.h>
  8. #endif
  9.  
  10. #define FIRSTNODE(l) ((APTR)((struct List*)l)->lh_Head)
  11. #define LASTNODE(l) ((APTR)((struct List*)l)->lh_TailPred)
  12.  
  13. #define NEXTNODE(n) ((APTR)((struct Node*)n)->ln_Succ)
  14. #define PREVNODE(n) ((APTR)((struct Node*)n)->ln_Pred)
  15.  
  16. #define FINDNAME(l,n) ((APTR)FindName((struct List*)l,n))
  17. #define REMHEAD(l) ((APTR)RemHead((struct List*)l))
  18. #define REMTAIL(l) ((APTR)RemTail((struct List*)l))
  19. #define REMOVE(n) Remove((struct Node*)n)
  20.  
  21. #define ADDHEAD(l,n) AddHead((struct List*)l,(struct Node*)n)
  22. #define ADDTAIL(l,n) AddTail((struct List*)l,(struct Node*)n)
  23. #define ENQUEUE(l,n) Enqueue((struct List*)l,(struct Node*)n)
  24.  
  25. #define NEWLIST(l) NewList((struct List*)l)
  26. #define ISLISTEMPTY(l) IsListEmpty(((struct List*)l))
  27.